import {
    HomeIcon,
    BookOpenIcon,
  } from "@heroicons/vue/24/outline";
  /**
   * 导航栏
   * 一级标题可配置children 
   * 若有children 则鼠标移入显示二级标题
   */
  interface ChildLink {
    title: string;
    path: string;
    badge?: string;
  }
  
  export interface NavLinkType {
    title: string;
    path?: string;
    icon: any; // 可以是组件或者字符串
    children?: ChildLink[];
    themeSwitch?: boolean;
    exact?: boolean;
    component?: string; // API中使用component字段表示主题切换组件
  }

 const navLinks: NavLinkType[] = [
    {
      path: "/",
      title: "首页",
      icon: HomeIcon,
      exact: true,
    },
    {
      title: "技术文章",
      icon: BookOpenIcon,
      //title随意 path 必须和content.config.ts 中的 collection 的 name 一致
      children: [
        {
          title: "Java",
          path: "/java",
          badge: "Vue|React",
        },
        {
          title: "Nuxt",
          path: "/nuxt",
          badge: "Node|Go",
        },
        {
          title: "业务分片",
          path: "/businessfragmentation",
          badge: "Docker|K8s",
        },
        {
            title:'JavaWeb',
            path:'/javaweb',
            badge:'Docker|K8s',
        },
        {
            title:'微服务',
            path:'/microservice',
            badge:'Docker|K8s',
        },
        {
            title:'常用框架',
            path:'/commonframework',
            badge:'Docker|K8s',
        },
        {
            title:'工具部署',
            path:'/tooldeployment',
            badge:'Docker|K8s',
        },
        {
            title:'数据存储',
            path:'/datastorage',
            badge:'Docker|K8s',
        },
        {
            title:'面试',
            path:'/interview',
            badge:'Docker|K8s',
        },
      ],
    },
    {
      title: "主题切换",
      icon: "theme",
      component: "ThemeToggle",
      themeSwitch: true,
    },
 
];




// 导出默认处理函数
export default defineEventHandler(async (event) => {
  return navLinks;
});
